drupal 8 get all nodes of type

50

drupal 8 get all nodes of type -

$nids = \Drupal::entityQuery('node')->condition('type','my_custom_type')->execute();
$nodes =  \Drupal\node\Entity\Node::loadMultiple($nids);

Comments

Submit
0 Comments